package com.k2data.k2app.domain.po;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.ZonedDateTime;
import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author lidong9144@163.com 17-3-16.
 */
@Data
@Table(name = "monitor_point")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class MonitorPoint implements Serializable {

    @Transient
    private static final long serialVersionUID = 3855251326139418048L;

    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;
    @NotNull
    private String sensorName;
    @NotNull
    private String sensorType;
    private Integer channelId;
    private Long tMonitorPointId;
    private String nameEn;
    @JsonIgnore
    private LocalDateTime createTime;
    @JsonIgnore
    private LocalDateTime updateTime;
    private Integer state;

    @Transient
    private Long deviceId;
    @Transient
    private Set<Map<String, Object>> channelIds;
    @Transient
    @JsonIgnore
    private Long rid;
    @Transient
    @JsonIgnore
    private String deviceName;
    @Transient
    @JsonIgnore
    private String channelName;
    @Transient
    @JsonIgnore
    private String bearingName;
    @Transient
    @JsonIgnore
    private String rotatDirec;
    @Transient
    @JsonIgnore
    private String samples;
    @Transient
    @JsonIgnore
    private String normalRevolution;
    @Transient
    @JsonIgnore
    private String susdRevolution;
    @Transient
    @JsonIgnore
    private String deltaSpeed;
    @Transient
    @JsonIgnore
    private String activity;
    @Transient
    @JsonIgnore
    private String orientDegree;
    @Transient
    @JsonIgnore
    private String keyId;


    // 关联表
    @JsonIgnore
    @Transient
    private List<MonitorVariable> variables;
    @JsonIgnore
    @Transient
    private List<RDeviceMonitorPointCopy> rs;

    @Transient
    private String fieldGroup;
}
